Performing predecode-time optimized instructions in conjunction with predecode time optimized instruction sequence caching

ABSTRACT

A method for performing predecode-time optimized instructions in conjunction with predecode time optimized instruction sequence caching. The method includes receiving a first instruction of an instruction sequence and a second instruction of the instruction sequence and determining if the first instruction and the second instruction can be optimized. In response to the determining that the first instruction and second instruction can be optimized, the method includes, preforming a pre-decode optimization on the instruction sequence and generating a new second instruction, wherein the new second instruction is not dependent on a target operand of the first instruction and storing a pre-decoded first instruction and a pre-decoded new second instruction in an instruction cache. In response to determining that the first instruction and second instruction can not be optimized, the method includes, storing the pre-decoded first instruction and a pre-decoded second instruction in the instruction cache.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of the legally relatedU.S. Ser. No. 13/432,357; filed Mar. 28, 2012, the contents of which areincorporated by reference herein in their entirety.

BACKGROUND

The present invention relates to the field of computer processors, andmore particularly, to performing predecode-time optimized instructionsin conjunction with predecode time optimized instruction sequencecaching.

An Out of Order (OoO) processor typically contains multiple executionpipelines that may execute instructions in a different order than whatthe program sequence (or “program order”) specifies in order to maximizethe average instruction per cycle rate by reducing data dependencies andmaximizing utilization of the execution pipelines allocated for variousinstruction types. Results of instruction execution are typically heldtemporarily in physical registers of one or more register files oflimited depth. An OoO processor typically employs register renaming toavoid unnecessary serialization of instructions due to the reuse of agiven architected register by subsequent instructions in the programorder.

Various methods and systems have been developed for decoding andoptimizing instructions for execution by an OoO processor. However,decoding instructions and performing additional decode time instructionoptimization can cause an increase in the power consumption and heatdissipation of a microprocessor. In addition, decoding instructions andperforming additional decode time instruction optimization can alsorequire the introduction of additional pipeline stages into amicroprocessor.

In instances where a series of instructions are required to be executedrepeatedly, such as with a program loop or recursive function, currentmethods for decoding instructions and performing additional decode timeinstruction optimization preform decoding and optimization operationsrepeatedly prior to execution of the instructions. This repetition ofdecoding and optimization for the same serious of instructions causesunnecessary power and heat dissipation, and execution delay due to theoptimizations being performed.

SUMMARY

Embodiments of the disclosure include a computer program product forperforming predecode-time optimized instructions in conjunction withpredecode time optimized instruction sequence caching. The computerprogram product includes a storage medium readable by a processingcircuit and storing instructions for execution by the processing circuitfor performing a method. The method includes receiving a firstinstruction of an instruction sequence and a second instruction of theinstruction sequence and determining if the first instruction and thesecond instruction can be optimized. In response to the determining thatthe first instruction and second instruction can be optimized, themethod includes, preforming a pre-decode optimization on the instructionsequence and generating a new second instruction, wherein the new secondinstruction is not dependent on a target operand of the firstinstruction and storing a pre-decoded first instruction and apre-decoded new second instruction in an instruction cache. In responseto determining that the first instruction and second instruction can notbe optimized, the method includes, storing the pre-decoded firstinstruction and a pre-decoded second instruction in the instructioncache.

Embodiments of the disclosure also include a system for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching. The system includes a processorconfigured to communicate with a main storage, the processor comprisingan instruction fetcher, an instruction modifier, an instruction cacheand one or more execution units, the processor configured to perform amethod. The method includes receiving a first instruction of aninstruction sequence and a second instruction of the instructionsequence and determining if the first instruction and the secondinstruction can be optimized. In response to the determining that thefirst instruction and second instruction can be optimized, the methodincludes, preforming a pre-decode optimization on the instructionsequence and generating a new second instruction, wherein the new secondinstruction is not dependent on a target operand of the firstinstruction and storing a pre-decoded first instruction and apre-decoded new second instruction in an instruction cache. In responseto determining that the first instruction and second instruction can notbe optimized, the method includes, storing the pre-decoded firstinstruction and a pre-decoded second instruction in the instructioncache.

Embodiments of the disclosure further include a method for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching. The method includes receiving afirst instruction of an instruction sequence and a second instruction ofthe instruction sequence and determining if the first instruction andthe second instruction can be optimized. In response to the determiningthat the first instruction and second instruction can be optimized, themethod includes, preforming a pre-decode optimization on the instructionsequence and generating a new second instruction, wherein the new secondinstruction is not dependent on a target operand of the firstinstruction and storing a pre-decoded first instruction and apre-decoded new second instruction in an instruction cache. In responseto determining that the first instruction and second instruction can notbe optimized, the method includes, storing the pre-decoded firstinstruction and a pre-decoded second instruction in the instructioncache.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with advantagesand features, refer to the description and to the drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 illustrates a block diagram of an exemplary system configurationfor use with the teachings herein;

FIG. 2 illustrates a block diagram of an exemplary processorconfiguration for use with the teachings herein;

FIG. 3 depicts an example instruction optimization analysis engineenvironment in accordance with an embodiment;

FIG. 4 is an example flowchart illustrating the operation of theoptimization analysis engine of FIG. 3;

FIG. 5 is an example flowchart illustrating the operation of theoptimization analysis engine of FIG. 3;

FIG. 6 is an example flowchart illustrating the operation of theoptimization analysis engine of FIG. 3; and

FIG. 7 illustrates a computer program product in accordance with anembodiment.

DETAILED DESCRIPTION

In accordance with an exemplary embodiment, a microprocessor instructionpredecode logic captures a stream, or series, of instructions anddecodes and performing optimizations on the series of instructions. Thedecoded and optimized instruction sequence is then stored directly inthe instruction cache. By storing the decoded and optimized instructionsin the instruction cache the cost with respect to power and performanceassociated with repeatedly performing decode time instructionoptimization can be avoided. For example, in some cases such as loops orin recursive functions a single instruction sequence can be executedrepeatedly. By pre-decoding and optimizing the instruction sequence andstoring the results in an instruction cache, the process no longer isrequired to decode and optimize the instruction sequence each time theinstruction sequence is executed.

With reference now to the figures, and in particular to FIG. 1, anexample is shown of a data processing system 100 which may include anOoO processor employing an intermediate register mapper as describedbelow with reference to FIG. 2. As shown in FIG. 1, data processingsystem 100 has a central processing unit (CPU) 110, which may beimplemented with processor 200 of FIG. 2. CPU 110 is coupled to variousother components by an interconnect 112. Read only memory (“ROM”) 116 iscoupled to the interconnect 112 and includes a basic input/output system(“BIOS”) that controls certain basic functions of the data processingsystem 100. Random access memory (“RAM”) 114, I/O adapter 118, andcommunications adapter 134 are also coupled to the system bus 112. I/Oadapter 118 may be a small computer system interface (“SCSI”) adapterthat communicates with a storage device 120. Communications adapter 134interfaces interconnect 112 with network 140, which enables dataprocessing system 100 to communicate with other such systems, such asremote computer 142. Input/Output devices are also connected tointerconnect 112 via user interface adapter 122 and display adapter 136.Keyboard 124, track ball 132, mouse 126 and speaker 128 are allinterconnected to bus 112 via user interface adapter 122. Display 138 isconnected to system bus 112 by display adapter 136. In this manner, dataprocessing system 100 receives input, for example, throughout keyboard124, trackball 132, and/or mouse 126 and provides output, for example,via network 142, on storage device 120, speaker 128 and/or display 138.The hardware elements depicted in data processing system 100 are notintended to be exhaustive, but rather represent principal components ofa data processing system in one embodiment.

Operation of data processing system 100 can be controlled by programcode, such as firmware and/or software, which typically includes, forexample, an operating system such as AIX® (“AIX” is a trademark of theIBM Corporation) and one or more application or middleware programs.Such program code comprises instructions discussed below with referenceto FIG. 2.

Referring now to FIG. 2, a block diagram of an exemplary processor 200for use with the teaching herein is depicted. Instructions are retrievedfrom memory (e.g., RAM 114 of FIG. 1) and loaded into instructionsequencing logic (ISL) 204, which includes Level 1 Instruction cache (L1I-cache) 206, fetch-decode unit 208, instruction queue 210 and dispatchunit 212. Specifically, the instructions are loaded in L1 I-cache 206 ofISL 204. The instructions are retained in L1 I-cache 206 until they arerequired, or replaced if they are not needed. Instructions are retrievedfrom L1 I-cache 206 and decoded by fetch-decode unit 208. After decodinga current instruction, the current instruction is loaded intoinstruction queue 210. Dispatch unit 212 dispatches instructions frominstruction queue 210 into register management unit 214, as well ascompletion unit 221. Completion unit 221 is coupled to general executionunit 224 and register management unit 214, and monitors when an issuedinstruction has completed.

When dispatch unit 212 dispatches a current instruction, unified mainmapper 218 of register management unit 214 allocates and maps adestination logical register number to a physical register withinphysical register files 232 a-232 n that is not currently assigned to alogical register. The destination is said to be renamed to thedesignated physical register among physical register files 232 a-232 n.Unified main mapper 218 removes the assigned physical register from alist 219 of free physical registers stored within unified main mapper218. All subsequent references to that destination logical register willpoint to the same physical register until fetch-decode unit 208 decodesanother instruction that writes to the same logical register. Then,unified main mapper 218 renames the logical register to a differentphysical location selected from free list 219, and the mapper is updatedto enter the new logical-to-physical register mapper data. When thelogical-to-physical register mapper data is no longer needed, thephysical registers of old mappings are returned to free list 219. Iffree physical register list 219 does not have enough physical registers,dispatch unit 212 suspends instruction dispatch until the neededphysical registers become available.

After the register management unit 214 has mapped the currentinstruction, issue queue 222 issues the current instruction to generalexecution engine 224, which includes execution units (EUs) 230 a-230 n.Execution units 230 a-230 n are of various types, such as floating-point(FP), fixed-point (FX), and load/store (LS). General execution engine224 exchanges data with data memory (e.g. RAM 114, ROM 116 of FIG. 1)via a data cache 234. Moreover, issue queue 222 may contain instructionsof FP type, FX type, and LS instructions. However, it should beappreciated that any number and types of instructions can be used.During execution, EUs 230 a-230 n obtain the source operand values fromphysical locations in register file 232 a-232 n and store result data,if any, in register files 232 a-232 n and/or data cache 234.

Still referring to FIG. 2, register management unit 214 includes: (i)mapper cluster 215, which includes architected register mapper 216,unified main mapper 218, intermediate register mapper 220, and (ii)issue queue 222. Mapper cluster 215 tracks the physical registersassigned to the logical registers of various instructions. In anexemplary embodiment, architected register mapper 216 has 16 logical(i.e., not physically mapped) registers of each type that store thelast, valid (i.e., checkpointed) state of logical-to-physical registermapper data. However, it should be recognized that different processorarchitectures can have more or less logical registers, as described inthe exemplary embodiment. Architected register mapper 216 includes apointer list that identifies a physical register which describes thecheckpointed state. Physical register files 232 a-232 n will typicallycontain more registers than the number of entries in architectedregister mapper 216. It should be noted that the particular number ofphysical and logical registers that are used in a renaming mappingscheme can vary.

In contrast, unified main mapper 218 is typically larger (typicallycontains up to 20 entries) than architected register mapper 216. Unifiedmain mapper 218 facilitates tracking of the transient state oflogical-to-physical register mappings. The term “transient” refers tothe fact that unified main mapper 218 keeps track of tentativelogical-to-physical register mapping data as the instructions areexecuted out-of-order. OoO execution typically occurs when there areolder instructions which would take longer (i.e., make use of more clockcycles) to execute than newer instructions in the pipeline. However,should an OoO instruction's executed result require that it be flushedfor a particular reason (e.g., a branch miss-prediction), the processorcan revert to the check-pointed state maintained by architected registermapper 216 and resume execution from the last, valid state.

Unified main mapper 218 makes the association between physical registersin physical register files 232 a-232 n and architected register mapper216. The qualifying term “unified” refers to the fact that unified mainmapper 218 obviates the complexity of custom-designing a dedicatedmapper for each of register files 232 (e.g., general-purpose registers(GPRs), floating-point registers (FPRs), fixed-point registers (FXPs),exception registers (XERs), condition registers (CRs), etc.).

In addition to creating a transient, logical-to-physical register mapperentry of an OoO instruction, unified main mapper 218 also keeps track ofdependency data (i.e., instructions that are dependent upon thefinishing of an older instruction in the pipeline), which is importantfor instruction ordering. Conventionally, once unified main mapper 218has entered an instruction's logical-to-physical register translation,the instruction passes to issue queue 222. Issue queue 222 serves as thegatekeeper before the instruction is issued to execution unit 230 forexecution. As a general rule, an instruction cannot leave issue queue222 if it depends upon an older instruction to finish. For this reason,unified main mapper 218 tracks dependency data by storing the issuequeue position data for each instruction that is mapped. Once theinstruction has been executed by general execution engine 224, theinstruction is said to have “finished” and is retired from issue queue222.

Register management unit 214 may receive multiple instructions fromdispatch unit 212 in a single cycle so as to maintain a filled, singleissue pipeline. The dispatching of instructions is limited by the numberof available entries in unified main mapper 218. In conventional mappersystems, which lack intermediate register mapper 220, if unified mainmapper 218 has a total of 20 mapper entries, there is a maximum of 20instructions that can be in flight (i.e., not checkpointed) at once.Thus, dispatch unit 212 of a conventional mapper system can conceivably“dispatch” more instructions than what can actually be retired fromunified main mapper 218. The reason for this bottleneck at the unifiedmain mapper 218 is due to the fact that, conventionally, aninstruction's mapper entry could not retire from unified main mapper 218until the instruction “completed” (i.e., all older instructions have“finished” executing).

According to one embodiment, intermediate register mapper 220 serves asa non-timing-critical register for which a “finished”, but “incomplete”instruction from unified main mapper 218 could retire to (i.e., removedfrom unified main mapper 218) in advance of the instruction's eventualcompletion. Once the instruction “completes”, completion unit 221notifies intermediate register mapper 220 of the completion. The mapperentry in intermediate register mapper 220 can then update thearchitected coherent state of architected register mapper 216 byreplacing the corresponding entry that was presently stored inarchitected register mapper 216.

When dispatch unit 212 dispatches an instruction, register managementunit 214 evaluates the logical register number(s) associated with theinstruction against mappings in architected register mapper 216, unifiedmain mapper 218, and intermediate register mapper 220 to determinewhether a match (commonly referred to as a “hit”) is present inarchitected register mapper 216, unified main mapper 218, and/orintermediate register mapper 220. This evaluation is referred to as alogical register lookup. When the lookup is performed simultaneously atmore than one register mapper (i.e., architected register mapper 216,unified main mapper 218, and/or intermediate register mapper 220), thelookup is referred to as a parallel logical register lookup.

In exemplary embodiments, a processor includes an instruction fetchingunit for obtaining instructions from main storage, a predecode unit fordecoding instructions, an instruction cache for storing decodedinstructions, an issue queue for queuing instructions to be executed,execution units for executing function of instructions and a dispatchunit for dispatching instructions to respective execution unitspreferably in a pipeline. In embodiments, an issue queue, a predecodeunit or a dispatch unit, for example, alone or in combination, maymodify an instruction such that it does not have to be executed after aprevious instruction.

In exemplary embodiments, the processor receives an instruction sequencethat includes a first instruction and a second instruction, wherein thesecond instruction is configured to use the results of the execution ofthe first instruction in executing the second instruction. A test of thetwo instructions determines that they can be modified in order toproduce instructions that can be executed more efficiently. For example,a first instruction sequence includes a first instruction “i0” and asecond instruction “i1”, and a sequence of multiple internal operations(“iops”) that are improvements of the instruction sequence. For example,a producer instruction followed by a consumer instruction in programorder (requiring in-order execution) might be optimized to create iop0corresponding to the producer instruction and iop1 corresponding to theconsumer instruction, where iop0 and iop1 can be executed out-of-order.

Referring now to FIG. 3, an block diagram of a system 300 for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching in accordance with an exemplaryembodiment is shown. The system 300 includes a first decoder 302 thatreceives a first instruction I0 from an instruction buffer 301 and asecond decoder 303 that receives a second instruction I1 from theinstruction buffer 301. In exemplary embodiments, the instruction buffer301 may receive instructions from next level cache or system memory. Thedecoders 302, 303 perform initial decoding of the instructions andprovide information regarding the instructions to an optimizationanalysis engine (OAE) 309. In exemplary embodiments, the informationprovided by the decoders 302, 303 to the OAE 309 can include operand andinstruction information and operand resources properties. The decoders302, 303 include instruction decode logic 305, 307 which generate aninitial decoded iop representation for the first and second instructioncorresponding to iop0 and iop1 when no optimization takes place.

In exemplary embodiments, the OAF 309 compares the decodedcharacteristics of the instructions received from decoders 302 and 303to determine whether the instructions are candidates for optimization.In accordance with one embodiment, the OAE 309 may also be responsive toa plurality of control signals, to suppress the recognition of compoundsequences, e.g., when a configuration bit is set. In exemplaryembodiments, the OAE 309 can be a single entity as shown in FIG. 3, orcan be replicated, distributed, split or otherwise integrated in one ormore of decoders 302 and 303, and the OAE 309 can be combined in asingle large compound decoder, e.g., including but not limited to acomplex decoder comprising the OAE 309, decoder 302 and decoder 303 in asingle structure, to facilitate logic optimization and circuit designimprovements.

The OAE 309 provides information indicating whether a sequence ofinstructions which can be optimized has been detected, as well asinformation about the nature of the sequence (i.e., which of a pluralityof instruction, and specific properties of the sequence required by thedecoder optimization logic to generate an optimized sequence) to thedecoders 302, 303. The OAE 309 may provide information to theinstruction optimization logic 306, 308 such as a decoded portion of aninstruction sequence being optimized, register information, immediatefields and operation codes. In addition, the OAE 309 may provideselection information to selection logic 314, 315 for determining if thedecoded instructions I0 or I1 should be used, or if an optimizedinstruction should be used. In exemplary embodiments, once the selectionlogic 314, 315 determines which instructions should be used theinstructions iop0 and iop1 are stored in instruction cache 320.

In exemplary embodiments, the decoders 302, 303 capture a series ofinstructions from the instruction buffer. The decoders 302, 303 decodeand optimize the instruction sequence and then store the decoded andoptimized instruction sequence directly in the instruction cache. Asused herein the term pre-op refers to a predecoded instruction that hasbeen stored in the instruction cache. In exemplary embodiments, thepre-op may be an optimized and decoded instruction and may includepredecoded information and preoptimized instruction sequenceinformation. By decoding and optimizing the instruction sequence andstoring the pre-ops directly in the instruction cache, the processor isable to avoid the additional cost associated with repeatedly performingdecode time instruction optimization prior to execution of theinstruction sequence.

In exemplary embodiments, the system 300 decodes and optimizes aminstruction sequence during a predecode time as opposed to a decodetime. For example, in the system shown FIG. 1B of U.S. patentapplication Ser. No. 11/743,699, which is hereby incorporated byreference in its entirety, the decode time instruction optimization ispreformed during a predecode block shown on FIG. 1B-1 as opposed to thedecode block shown on FIG. 1B-2. Since the dynamic instruction sequencemay not be known during the predecode time, the optimization can bebased on instruction segments.

In exemplary embodiments, the system 300 may also store possible entrypoints into the instruction cache 320, i.e., where an optimization hasnot changed two adjacent instructions such that a branch into middle ofsequence would change program behavior. Furthermore, the system 300 mayinclude a known entry point vector 318 which includes known entry pointsfor each cache line. The known entry point vector 318 may be stored inthe instruction cache 320 with predecoded instruction operations. Inexemplary embodiments, the first instruction in an instruction sequenceis always a known entry point, assuming that the instruction logic willnot perform optimizations across a cache block boundary. In oneembodiment, each time a re-optimization event is triggered, branchtargets are added to known entry point vector 318.

Referring now to FIG. 4, a flowchart showing a method for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching in accordance with an exemplaryembodiment is shown. The method includes receiving instruction sequencefrom next level cache or system memory, as shown at block 400. Atdecision block 402, the method determines if the instruction sequencecan be optimized. If the instruction sequence can be optimized, themethod includes preforming pre-decode time optimization on the sequenceof instructions, as shown at block 404. As shown at block 406, themethod includes preforming a pre-decode of the instruction sequence.Finally, as shown at block 408, the pre-decoded instruction sequence isstored in instruction cache.

Turning now to FIG. 5, a flowchart showing another method for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching in accordance with an exemplaryembodiment is shown. As shown at block 500, the method includesdetecting an instruction miss or a new entry point. Next as shown atblock 502, the method includes receiving instruction sequence from nextlevel cache or system memory. At decision block 504, the methoddetermines if a re-optimization event has been indicated. If are-optimization event is not indicated, the method includes performingpre-decode time optimization on the instruction sequence, as shown atblock 506. The method also includes performing a pre-decode on theinstruction sequence, as shown at block 508. As shown at block 510, themethod includes storing pre-ops in instruction cache. The methodconcludes by indicating that the reload of the instruction sequence ininstruction cache was complete, as shown at block 512.

Referring now to FIG. 6, a flowchart showing another method forperforming predecode-time optimized instructions in conjunction withpredecode time optimized instruction sequence caching in accordance withan exemplary embodiment is shown. As shown at block 600, the methodincludes fetching a cache block, or pre-op segment, from the instructioncache. Next, as shown at decision block 602, the method includesdetermining if there was a cache miss in loading the cache block. If so,the method waits for an indication that a cache reload has completed, asshown at block 604. Otherwise, the method proceeds to decision block 606and determines whether cache block address corresponds to a branchtarget and if the target address corresponds to a known entry point. Ifnot, the method includes performing re-optimization notification andreload cache block (e.g., one of segment/subline/line) as shown at block608. Otherwise, the method proceeds to block 610 and optionally performadditional DTIO optimizations. Next, as shown at block 612, the methodincludes decoding per-ops to iops. The method concludes at block 614 byexecuting the iops.

Those skilled in the art will appreciate that while the exemplaryembodiments have been directed towards the detection of two-instructionsequences, and OAE may be connected to more than two decoders, andidentify instruction sequences consisting of more than 2 instructions.Furthermore, the sequence of instructions may be separated by additionalinstructions in an embodiment.

In an embodiment, a pair of instructions are determined to be candidatesfor optimization, in order to be executed out-of-order by any one of adecode logic circuit, a dispatch logic circuit, an issue queue logiccircuit or a cracking logic circuit operating on the instructions to beoptimized. In another embodiment, an optimization circuit determinescandidate instructions for optimization at or after an instructiondecode circuit decodes the candidate instructions, and causes theoptimized instruction to be effectively inserted in the pipeline ratherthan the original instruction being optimized.

As described above, embodiments can be embodied in the form ofcomputer-implemented processes and apparatuses for practicing thoseprocesses. An embodiment may include a computer program product 700 asdepicted in FIG. 7 on a computer readable/usable medium 702 withcomputer program code logic 704 containing instructions embodied intangible media as an article of manufacture. Exemplary articles ofmanufacture for computer readable/usable medium 702 may include floppydiskettes, CD-ROMs, hard drives, universal serial bus (USB) flashdrives, or any other computer-readable storage medium, wherein, when thecomputer program code logic 704 is loaded into and executed by acomputer, the computer becomes an apparatus for practicing theinvention. Embodiments include computer program code logic 704, forexample, whether stored in a storage medium, loaded into and/or executedby a computer, or transmitted over some transmission medium, such asover electrical wiring or cabling, through fiber optics, or viaelectromagnetic radiation, wherein, when the computer program code logic704 is loaded into and executed by a computer, the computer becomes anapparatus for practicing the invention. When implemented on ageneral-purpose microprocessor, the computer program code logic 704segments configure the microprocessor to create specific logic circuits.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or schematic diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

As described above, embodiments can be embodied in the form ofcomputer-implemented processes and apparatuses for practicing thoseprocesses. In embodiments, the invention is embodied in computer programcode executed by one or more network elements. Embodiments include acomputer program product on a computer usable medium with computerprogram code logic containing instructions embodied in tangible media asan article of manufacture. Exemplary articles of manufacture forcomputer usable medium may include floppy diskettes, CD-ROMs, harddrives, universal serial bus (USB) flash drives, or any othercomputer-readable storage medium, wherein, when the computer programcode logic is loaded into and executed by a computer, the computerbecomes an apparatus for practicing the invention. Embodiments includecomputer program code logic, for example, whether stored in a storagemedium, loaded into and/or executed by a computer, or transmitted oversome transmission medium, such as over electrical wiring or cabling,through fiber optics, or via electromagnetic radiation, wherein, whenthe computer program code logic is loaded into and executed by acomputer, the computer becomes an apparatus for practicing theinvention. When implemented on a general-purpose microprocessor, thecomputer program code logic segments configure the microprocessor tocreate specific logic circuits.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

What is claimed is:
 1. A computer program product for performingpredecode-time optimized instructions in conjunction with predecode timeoptimized instruction sequence caching, the computer program productcomprising: a storage medium readable by a processing circuit andstoring instructions for execution by the processing circuit forperforming a method comprising: receiving a first instruction of aninstruction sequence and a second instruction of the instructionsequence; determining if the first instruction and the secondinstruction can be optimized; responsive to the determining that thefirst instruction and second instruction can be optimized: preforming apre-decode optimization on the instruction sequence and generating a newsecond instruction, wherein the new second instruction is not dependenton a target operand of the first instruction; and storing a pre-decodedfirst instruction and a pre-decoded new second instruction in aninstruction cache; responsive to the determining that the firstinstruction and second instruction can not be optimized, storing thepre-decoded first instruction and a pre-decoded second instruction inthe instruction cache.
 2. The computer program product of claim 1,further comprising storing an entry point corresponding to the firstinstruction to an entry point vector.
 3. The computer program product ofclaim 2, wherein the entry point vector is stored in the instructioncache.
 4. The computer program product of claim 1, wherein determiningif the first instruction and the second instruction can be optimized ispreformed by an optimization analysis engine.
 5. The computer programproduct of claim 1, wherein the new second instruction specifies thesource operand locations of the first instruction and at least onesource operand location of the second instruction.
 6. The computerprogram product of claim 1, wherein the target operand location is afirst target register of the first instruction and the source operandlocation is a source register of the second instruction.
 7. A method forperforming predecode-time optimized instructions in conjunction withpredecode time optimized instruction sequence caching, the computerprogram product comprising: a storage medium readable by a processingcircuit and storing instructions for execution by the processing circuitfor performing a method comprising: receiving a first instruction of aninstruction sequence and a second instruction of the instructionsequence; determining if the first instruction and the secondinstruction can be optimized; responsive to the determining that thefirst instruction and second instruction can be optimized: preforming apre-decode optimization on the instruction sequence and generating a newsecond instruction, wherein the new second instruction is not dependenton a target operand of the first instruction; and storing a pre-decodedfirst instruction and a pre-decoded new second instruction in aninstruction cache; responsive to the determining that the firstinstruction and second instruction can not be optimized, storing thepre-decoded first instruction and a pre-decoded second instruction inthe instruction cache.
 8. The method of claim 7, further comprisingstoring an entry point corresponding to the first instruction to anentry point vector.
 9. The method of claim 8, wherein the entry pointvector is stored in the instruction cache.
 10. The method of claim 7,wherein determining if the first instruction and the second instructioncan be optimized is preformed by an optimization analysis engine. 11.The method of claim 7, wherein the new second instruction specifies thesource operand locations of the first instruction and at least onesource operand location of the second instruction.
 12. The method ofclaim 7, wherein the target operand location is a first target registerof the first instruction and the source operand location is a sourceregister of the second instruction.